package com.asm.repository;

import com.asm.entity.sys.Role;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

public interface RoleRepository extends JpaRepository<Role, Long> {
    Page<Role> findByCode(String code, Pageable page);

    @Query("select c from Role c where c.isDel=false ")
    Page<Role> findAll(PageRequest of);
}
